package com.example.myuniversity;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.graphics.Typeface;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class WelcomeActivity extends Activity {
	private TextView txtInput,txtTitle;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_welcome);
		txtInput=(TextView) findViewById(R.id.image_welcome_input);
		txtTitle=(TextView) findViewById(R.id.txt_welcome_title);
		Typeface typeface=Typeface.createFromAsset(getAssets(), "fonts/youyuan.ttf");
		txtTitle.setTypeface(typeface);
		txtInput.setTypeface(typeface);
		new AsyncTask<Void, Void, Void>(){
			@Override
			protected Void doInBackground(Void... params) {
				try {
					Thread.sleep(3000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				return null;
			}
			protected void onPostExecute(Void result) {
					finish();
			}
			
			
		}.execute();
		
		txtInput.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				finish();
			}
		});
	}
	
	
}
